#!/usr/bin/make -f

include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

DEB_MAKE_CLEAN_TARGET := clean

#DEB_INSTALL_MANPAGES_libevas-doc := $(DEB_SRCDIR)/doc/man/man3/*.3
DEB_DH_STRIP_ARGS := --dbg-package=libevas-dbg

DEB_CONFIGURE_EXTRA_FLAGS := --enable-strict \
	--enable-fontconfig \
	--enable-software-x11 \
	--enable-fb \
	--enable-buffer \
	--enable-gl-x11 \
	--enable-xrender-x11 \
	--enable-image-loader-gif \
	--enable-image-loader-png \
	--enable-image-loader-jpeg \
	--enable-image-loader-eet \
	--enable-font-loader-eet \
	--enable-image-loader-tiff \
	--enable-image-loader-xpm \
	--enable-image-loader-svg \
	--enable-scale-sample \
	--enable-scale-smooth \
	--enable-convert-yuv \
	--enable-small-dither-mask \
	--enable-no-dither-mask \
	--enable-convert-8-rgb-332 \
	--enable-convert-8-rgb-666 \
	--enable-convert-8-rgb-232 \
	--enable-convert-8-rgb-222 \
	--enable-convert-8-rgb-221 \
	--enable-convert-8-rgb-121 \
	--enable-convert-8-rgb-111 \
	--enable-convert-16-rgb-565 \
	--enable-convert-16-bgr-565 \
	--enable-convert-16-rgb-555 \
	--enable-convert-16-rgb-444 \
	--enable-convert-16-rgb-ipq \
	--enable-convert-16-rgb-rot-0 \
	--enable-convert-16-rgb-rot-180 \
	--enable-convert-16-rgb-rot-270 \
	--enable-convert-16-rgb-rot-90 \
	--enable-convert-24-rgb-888 \
	--enable-convert-24-bgr-888 \
	--enable-convert-32-rgb-8888 \
	--enable-convert-32-rgbx-8888 \
	--enable-convert-32-bgr-8888 \
	--enable-convert-32-bgrx-8888 \
	--enable-convert-32-rgb-rot-0 \
	--enable-convert-32-rgb-rot-180 \
	--enable-convert-32-rgb-rot-270 \
	--enable-convert-32-rgb-rot-90 \
	--disable-rpath \
	--enable-pthreads

build/libevas-doc::
	cd $(DEB_SRCDIR) && ./gendoc

install/libevas-doc::
	cp -R $(DEB_SRCDIR)/doc/html debian/libevas-doc/usr/share/doc/libevas-doc/
	cd $(DEB_SRCDIR)/doc/man/man3 && ls -1 | grep -vi evas | xargs rm

clean::
	rm -rf $(DEB_SRCDIR)/doc/html $(DEB_SRCDIR)/doc/latex $(DEB_SRCDIR)/doc/man
	./autogen.sh --prefix=/usr $(DEB_CONFIGURE_EXTRA_FLAGS) 

